﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YS.Domain.IoT.Receive;

namespace YS.K12.Application.IoT.Service.ReplyCommand
{
    public interface IReplyCommandService
    {
        /// <summary>
        /// 通用回复函数
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="response"></param>
        /// <param name="request"></param>
        /// <param name="newPrvkey"></param>
        /// <returns></returns>
        Task<bool> SendAsync<T>(T response, RequestInfo request, string newPrvkey = null) where T : BaseCmd;
        /// <summary>
        ///平台调用发送函数 不会记录日志
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="response"></param>
        /// <param name="command"></param>
        /// <param name="messageId"></param>
        /// <returns></returns>
        Task<bool> SendAsync<T>(T response, string command, string messageId = null) where T : BaseCmd;
        /// <summary>
        ///不回复 只记录日志
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<bool> NoSendAsync(RequestInfo request);

    }
}
